home *** CD-ROM | disk | FTP | other *** search
/ Night Owl 8 / Night Owl CD-ROM (NOPV8) (Night Owl Publisher) (1993).ISO / 034a / tuthex.arj / TUTHEX3.TXT < prev    next >
Text File  |  1992-05-12  |  4KB  |  65 lines

  1. TUTORIAL "HEXING 101" PART 3
  2. On to PCTools!  Part of PCT has a menu that allows you to
  3. select a file, then HEX EDIT the file.  Actually, I also use
  4. the hex edit option to "look" inside of files, then I exit
  5. without any changes.  This is very powerful - it allows you
  6. to "debug" a file without much tedious typing - a mouse
  7. performs most of the work. You can also freely jump back and
  8. forth, and correct any typos ON THE SPOT.  This makes it 1k
  9. better than debug.  Let's look at the P51D.SPC file using PCT
  10. -here's what you'll see on the first line (except this isn't
  11. wide enough, so I'll only do most of it):
  12. 0000 (0000) 50 2D 35 31 44 00 00 00 00 00 00 00 0B 00 06 2C
  13. Notice that the PCTools display has 3 sections, on the left
  14. are the addresses, in the middle are the first 16 byte values
  15. and the far right section (not shown above) has the ASCII
  16. equivalents of the 16 bytes.  Notice also that the address
  17. code that translates best into debug is the one in the (), ie
  18. (0000).  This first line runs from the beginning of the file
  19. (byte 0000, equal to debug 100) to the 16th byte 000F.
  20. Remember the first byte is zero, so the 16th is a "F" The
  21. addresses for each byte in the first row are: 0000, 0001,
  22. 0002, 0003, 0004, 0005, 0006, 0007, 0008, 0009, 000A, 000B,
  23. 000C, 000D, 000E, 000F.  This equals to the addresses (in
  24. debug) of 100, 101, 102, 103, 104, 105, 106, 107, 108, 109,
  25. 10A, 10B, 10C, 10D, 10E, 10F. What this means is that every
  26. single pair of numbers, ie each byte value, has it's own
  27. address.  When we discover what a certain byte does, we can
  28. tell each other by referring to it's specific address.  For
  29. example, in the first line, the address (000C) or (debug 10C)
  30. has a value of 0B.  This value, 0B, is the code for the P51D
  31. on the menu listing planes shot down at the end of a mission.
  32. A value of 0A here tells the computer that the plane shot
  33. down was a P51B.  A value of 01, BTW, is for a Bf109G6.
  34. Notice also that the first 5 bytes look like this: 50 2D 35
  35. 31 44.  These are the ASCII equivalent bytes for P (dash) 5 1
  36. D.  In fact, the first 11 bytes can be used to spell any name
  37. you'd like on the weapons selection menu.
  38. Now, switch your view down to address (00E8).  (this is
  39. halfway across the 00E0 line).  You will see the byte values
  40. 01 06 02 00 90 01 8B 08.  This is actually the first half of
  41. the "weapons string" which is 16 bytes long. It continues on
  42. line (00F0) with 06 00 01 00 00 00 C8 00. Therefore the
  43. entire string goes like this:
  44. 01 06 02 00 90 01 8B 08 06 00 01 00 00 00 C8 00  half on one
  45. line, half on the other.  All standard weapons in the game
  46. start at an xxx8 position, ie halfway across, in the areas
  47. from (00E8) to about (01A7).  Let's examine this weapons
  48. string in depth.  The first byte of each weapon string
  49. determines the type of weapon 01 here means mg/cannon.
  50. 02=bomb 03=rocket 04=drop tank 05=jagdfaust.  The next byte,
  51. for us 06, accesses the 6th weapon listing in the
  52. BAMERSTR.PAC file, which means the weapons menu will read "6
  53. x .50 cal" and "400 rounds" ammo.  What if we were to change
  54. this 06 value to a 01? The weapons menu would now read 8 x
  55. .50 cal mg, but NOTHING else would change.  You would still
  56. have all the characteristics of 4 x .50 cal.  The point is,
  57. you can customize weapons.  The third byte controls the
  58. tracer. 00=single 01=dual narrow 02=dual wide.  The fifth and
  59. sixth bytes control ammo amounts. 90 01 = 400 rounds. (9x16s,
  60. plus 1x256)  CONTINUED NEXT LESSON
  61.  
  62.  
  63.  
  64.  
  65.